<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<base href="<%=request.getContextPath()%>/">
<link rel="stylesheet" href="about/css/bootstrap.min.css">
<link href="about/css/myCss.css" type="text/css" rel="stylesheet">
<link href="about/css/main.css" type="text/css" rel="stylesheet">
<link href="about/css/base.css" type="text/css" rel="stylesheet">
<!--按钮样式表-->
<link href="about/css/btn.css" type="text/css" rel="stylesheet">
<link href="about/css/css.css" type="text/css" rel="stylesheet">
<link href="about/css/index.css" type="text/css" rel="stylesheet">
<link href="about/css/search.css" type="text/css" rel="stylesheet">
<script src="about/js/jquery.min.js"></script>
<script src="about/js/bootstrap.min.js"></script>
<script src="about/js/jQuery.rTabs.js"></script>
<title>今日护理安排</title>
<script type="text/javascript">
	function handle(event) {
		event.preventDefault();
		var url = "/beadhouse/api/customer/selectCustomer";
		$.get(url, {
			idCard : $("#idCard").val()
		}, function(r) {
			console.log(r.data);
			$("#idCard").val(r.data.id);
			$("#name").val(r.data.customerName);
			if (r.data.customerSex) {
				$("#sex").val("男");
			} else {
				$("#sex").val("女");
			}
			$("#age").val(r.data.customerAge);
			$("#no").val(r.data.recordId);
			$("#remark").val(r.data.remark);
		});

	};
</script>
<style>
body {
	text-align: center;
}
</style>
</head>
<body>



	<form action="/beadhouse/api/bed/addCustomer">

		<p>
			<label for="customerIdEL">客户身份证：</label> <input id="idCard"
				type="text" name="customerId" maxlength="32" class="grow"
				id="codeEL" placeholder="3-32个字符，支持字母，数字，中横线"
				class="btn dropdown-toggle btn-default">
			<button class="btn btn-primary" onclick="handle(event)">查询</button>
		</p>
		<p>
			<input type="hidden" name="id" maxlength="128"
				placeholder="不超过128个字符" value="${data}">
		</p>

		<p>
			<label>客户名字</label> <input type="" id="name" maxlength="128"
				placeholder="不超过128个字符" value="未知">
		</p>
		<p>
			<label> 客户性别 </label> <input type="" id="sex" maxlength="128"
				placeholder="不超过128个字符" value="未知">
		</p>
		<p>
			<label>客户年龄</label> <input type="" id="age" maxlength="128"
				placeholder="不超过128个字符" value="未知">
		</p>
		<p>
			<label>档案编号</label> <input type="" id="no" maxlength="128"
				placeholder="不超过128个字符" value="未知">
		</p>
		<p>
			<label>备注 </label> <input type="" id="remark" maxlength="128"
				placeholder="不超过128个字符" value="未知">
		</p>
		<button type="submit" class="btn btn-default">确定</button>

		<a href="/beadhouse/api/bed/selectAll" type="button"
			class="btn btn-default" data-dismiss="modal">返回 
	</form>



</body>
</html>
